package cn.tedu.storage.controller;

import cn.tedu.storage.service.StorageService;
import cn.tedu.storage.service.StorageServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author wy
 * @Date 2021/3/4 17:13
 * @Version 1.0
 */
@RestController
public class StorageController {
    @Autowired
    private StorageService storageService;

    @GetMapping("/decrease")
    public String decrease(Long productId,Integer count){
        storageService.decrease(productId, count);
        return "库存减少成功";
    }

}
